package com.zb.framework.api.microservice;

import com.zb.framework.api.dto.DemoDTO;
import com.zb.framework.api.fallback.DemoMicroServiceFallbackFactory;
import com.zb.zeus.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fujianjian
 * @since 2021/7/1 20:43
 */
@FeignClient(contextId = "demoMicroService", value = "${feign.ref.service.project-name:PROJECT-NAME}",
        fallbackFactory = DemoMicroServiceFallbackFactory.class)
public interface DemoMicroService {

    /**
     *
     * @param reqDto
     * @return
     */
    @GetMapping("/api/demo/detail")
    AjaxResult detail(@SpringQueryMap DemoDTO reqDto);

    /**
     *
     * @param source
     * @return
     */
    @GetMapping("/api/demo/greet")
    AjaxResult greet(@RequestParam("source") String source);
}
